#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 1e5+10;
int flag[maxn];
int main()
{
	int d,cnt = 0;
	int a[4];
	scanf("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&d);
	memset(flag,0,sizeof(flag));
	for(int i = 0;i<4;i++)
	{
		//printf("****%d\n",a[i]);
		for(int j = a[i];j<=d;j=j+a[i])
		{
		//	printf("****%d\n",j);
			if(!flag[j])
			{
				cnt++;
				flag[j] = 1;
			}
			//j = j*k;
		}
	}
	printf("%d\n",cnt);
}
